package homework305;

public class zuoyeaz4 extends Thread {
	char AZ ='A';
	@Override
	public void run() {
        while (true) {
            synchronized (zuoyed4.lock) {
            	if(zuoyed4.count != 0){
                    System.out.println(AZ);
                    AZ++;
                    zuoyed4.count = 0;
                    zuoyed4.lock.notify();
            	}else{
                try {
                    zuoyed4.lock.wait();
                    Thread.sleep(500);
                } catch (InterruptedException e) {
                    e.printStackTrace();
                }
            }
            }
        }
    }
}
